package VN.EDU.IMIC.DEVELOPER.LETRONGKHANH.JDBC_DEMO;

import java.sql.Connection;

import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
import com.microsoft.sqlserver.jdbc.SQLServerException;
import com.sqlserver.imic.edu.vn.ConnectionManager.SqlConnection;

public class DBConnection_Libs {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Khai bao khoi tao doi tuong
	Connection objConnection;
	SqlConnection obj = new SqlConnection();
	
try {
	objConnection = obj.OpenConnection("DESKTOP-F43Q9GJ", "sa", "12345", "QLBH", 1433); 
	if(!objConnection.isClosed()){
		 System.out.println(" Ket noi thanh cong");
	}else {
		System.out.println("ket noi that bai");
	}
} catch (Exception e) {
	e.printStackTrace();
}
	}

}
